New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not generating URLs with "limitstart=0" #4393
Conversation
Instead of removing the "limitstart" parameter in the router file (see joomla#3725 ), we do not generate URLs with "limitstart=0". Kind of weird to add it there to be then removed in the router, isn't it? So components will be able to use the parameter "limitstart=0" if they want to... and we still avoid the duplicate url issue we used to have. Sounds like a win / win! :)
With the patch joomla#4393 we also modify the router in order to accept this parameter. So components which want to use it for resetting the pagination, still can.
Travis fails. |
Yes I saw that this night. Travis failed due to "JPaginationTest::testGetData", but at this moment I think there is something wrong the the "JPaginationTest" tests because with the modification of the router ( #3725 ) the unit tests should not work too.
Because we got a consistency problem. |
In my case on J!3.3.4 with "Use URL rewriting" disabled it fix the issue |
It works with this fix but the address is now "?start=0" |
Hi, Please precise your test context because if you use the classical pagination system, like in a article listing, you won't see any "limitstart=0" or "start=0" in the url. But in your case, you tested in Kunena, which have his own pagination override for the generation of the url, so the modification in the pagination class does not affect you (and yes, that's one of the goal of this PR). But the problem I see in your message is the interrogation point. I hope I am clear enough. Regards, |
@test |
@test Excuse me, my first comment it was a misunderstanding by me. |
No problem rich20 ! Now the question about Travis is still there (and I'm not an expert on the unit test files) |
+1 the pagination works with this fix |
I have looked tests results, it doesn't expect a index.php?limitstart=0 for href for start :
@hikashop-jerome : is-it help ? |
Actually it looks to me like the That is likely also the reason why Travis rightfully fails with this PR, because you now try to apply the same change to non-SEF URLs as well. |
The JPagination unit tests were pretty much the first unit tests I ever wrote so I wouldn't be suprised at all if the code quality there is lacking in some way! |
Hi, I'm not sure if I understand everything that is mentioned here. But I also have a problem with the pagination. The pagination link href URL contains 'start='. This does not work. It only works with the site settings 'URL rewriting' - Off'. When I change the 'start=' part of the URL to 'limitstart=' this shows the correct page. I do not know why. I'm currently on Joomla 3.3.6. But this problem also was there on 3.3.3 I believe. My solution for now is to use jQuery to replace 'start=' part of the the pagination href URL's to 'limitstart='. This gets the pagination working for my site. jQuery("div.pagination a").each(function() { |
I think this can be closed. because f450b30 |
Hi, I tried the f450b30 patch but this not solve the problem on my site (pagination on tags blogpage). I'll stick with the jQuery solution for now... |
Hi, This pull-request was mainly for the SEF problem related to the pagination and the lost of the "limitstart=0". Regards, |
OK, thanks! |
Instead of removing the "limitstart" parameter in the router file (see #3725 ), we do not generate URLs with "limitstart=0".
Kind of weird to add it there to be then removed in the router, isn't it?
So components will be able to use the parameter "limitstart=0" if they want to... and we still avoid the duplicate url issue we used to have.
Sounds like a win / win! :)